package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SGroup extends Object implements IMessageBase
    {
        public var groupId:SEntityId;
        public var captainId:SEntityId;
        public var name:String;
        public var pwd:String;
        public var allocation:int;
        public var warfare:int;
        public var career:int;
        public var joinInFighting:Boolean;
        public var fighting:Boolean;
        public var playerCount:int;
        public var maxPlayer:int;
        public var level:int;
        public var copyCode:int;
        public var memberInvite:Boolean;
        public var players:Array;
        public const _type:int = 20403;
        public static var _regist:SGroup = new SGroup(true);

        public function SGroup(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SGroup();
        }

        public function __write(param1:SerializeStream) : void
        {
            this.groupId.__write(param1);
            this.captainId.__write(param1);
            param1.writeString(this.name);
            param1.writeString(this.pwd);
            param1.writeInt(this.allocation);
            param1.writeInt(this.warfare);
            param1.writeShort(this.career);
            param1.writeBool(this.joinInFighting);
            param1.writeBool(this.fighting);
            param1.writeByte(this.playerCount);
            param1.writeByte(this.maxPlayer);
            param1.writeByte(this.level);
            param1.writeInt(this.copyCode);
            param1.writeBool(this.memberInvite);
            SeqPublicMiniPlayerHelper.write(param1, this.players);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.groupId = new SEntityId();
            this.groupId.__read(param1);
            this.captainId = new SEntityId();
            this.captainId.__read(param1);
            this.name = param1.readString();
            this.pwd = param1.readString();
            this.allocation = param1.readInt();
            this.warfare = param1.readInt();
            this.career = param1.readShort();
            this.joinInFighting = param1.readBool();
            this.fighting = param1.readBool();
            this.playerCount = param1.readByte();
            this.maxPlayer = param1.readByte();
            this.level = param1.readByte();
            this.copyCode = param1.readInt();
            this.memberInvite = param1.readBool();
            this.players = SeqPublicMiniPlayerHelper.read(param1);
            
        }

    }
}
